nginx install
設定ファイル準備(/etc/yum.repos.d/nginx.repo)
code:txt
name=nginx repo
gpgcheck=0
enabled=1
install
code:shell
# yum install nginx
conf チェック
code:shell
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
設定ファイルが別のデフォルト以外にある場合
code:shell
# nginx -c /path/to/nginx.conf
起動
code:shell
# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
# systemctl start nginx
root 3777 0.0 0.1 46320 968 ? Ss 15:57 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 3778 0.0 0.3 46720 1928 ? S 15:57 0:00 \_ nginx: worker process
reload は現在処理中のリクエストは中断しない